<?PHP

//default values

$e['server']='rtmp://';
$e['artwork']='http://';
$e['hash']=randomchar();
$table='ad_campaign';
$id='id';
$catch='name';
$content_msg=$_GET['cmd'];
include 'b/default_process_form.php';
printformheader('Campaigns',$content_msg);


begin_form($_GET['cmd'],$id);
?>
<h2>Campaign Information</h2>

<?PHP
	p_input('client',$o,$e);
	p_input('name',$o,$e);
	
	$o['none']=true;
	$enum_data=get_enum($table,'type');
	p_select('type',$enum_data,$e,'0','1',$o);
	p_date('start',$o,$e);
	p_date('end',$o,$e);
	
	p_input('total_impressions',$o,$e);
	$enum_data=get_enum($table,'priority');
	p_select('priority',$enum_data,$e,'0','1',$o);
	p_input('hash',$o,$e);

	if($_GET['cmd']=='edit')
	{
		delete_item();
	}
	
	printsubmit("Save");
	end_form($_GET['cmd']);
	printformfooter('View Content','?q=m/content/v_content.php',NULL,NULL,NULL,NULL);

?>